/**
 * Generate time : 2011-05-17 4:50:01
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cs.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCSBusinessFilterDetails table comment : 业务过滤明细
 */
public class ZMCSBusinessFilterDetails extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdBusinessFilterId = " "; /* 主表ID */
	private String fdDepartmentId = " "; /* 部门ID */
	private String fdType = " "; /* 类型 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBusinessFilterId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主表ID");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdDepartmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("部门ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdType");
		eiColumn.setFieldLength(4);
		eiColumn.setDescName("类型");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCSBusinessFilterDetails() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdBusinessFilterId - 主表ID
	 * 
	 * @return the fdDepartmentId
	 */
	public String getFdBusinessFilterId() {
		return this.fdBusinessFilterId;
	}

	/**
	 * set the fdBusinessFilterId - 主表ID
	 */
	public void setFdBusinessFilterId(String fdBusinessFilterId) {
		this.fdBusinessFilterId = fdBusinessFilterId;
	}
	
	/**
	 * get the fdDepartmentId - 部门ID
	 * 
	 * @return the fdDepartmentId
	 */
	public String getFdDepartmentId() {
		return this.fdDepartmentId;
	}

	/**
	 * set the fdDepartmentId - 部门ID
	 */
	public void setFdDepartmentId(String fdDepartmentId) {
		this.fdDepartmentId = fdDepartmentId;
	}

	/**
	 * get the fdType - 类型
	 * 
	 * @return the fdType
	 */
	public String getFdType() {
		return this.fdType;
	}

	/**
	 * set the fdType - 类型
	 */
	public void setFdType(String fdType) {
		this.fdType = fdType;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdBusinessFilterId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdBusinessFilterId")), fdBusinessFilterId));
		setFdDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentId")), fdDepartmentId));
		setFdType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdType")), fdType));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdBusinessFilterId", StringUtils.toString(fdBusinessFilterId, eiMetadata.getMeta("fdBusinessFilterId")));
		map.put("fdDepartmentId", StringUtils.toString(fdDepartmentId, eiMetadata.getMeta("fdDepartmentId")));
		map.put("fdType", StringUtils.toString(fdType, eiMetadata.getMeta("fdType")));

		return map;

	}
}